<template>
  <view>
    <!-- parse <include src="../component/navigationBar.wxml"></include> -->
    <block>
      <view
          :style="'padding-top:' + nTop + 'px;height:' + nHeight + 'px;line-height:' + nHeight + 'px;--color:' + color + ';'"
          class="navigationBox">
        <view :style="'height:' + nHeight + 'px;top:' + nTop + 'px'" class="nBar">
          <navigator :openType="pages.length === 1 ? 'switchTab' : 'navigateBack'"
                     :url="pages.length == 1 ? '/pages/index/index4' : ''" class="ico"
                     hoverClass="none">
            {{ pages.length == 1 ? '' : '' }}
          </navigator>
          <view class="title">{{ nTitle }}</view>
        </view>
      </view>
    </block>
    <scroll-view
        :enableBackToTop="true"
        :enableFlex="true"
        :refresherEnabled="true"
        :refresherTriggered="triggered"
        :scrollTop="scrolltopNum_trend"
        :scrollWithAnimation="true"
        :scrollY="true"
        :style="'margin-top:' + nTH + 'px;height:-webkit-calc(100vh - ' + nTH + 'px);--color:' + color + ';--rgbcolor:' + rgbcolor + ';'"
        class="trend"
        lowerThreshold="300"
        @refresherrefresh="trend_topFn"
        @scroll="binnd_scroll_index"
        @scrolltolower="trend_btmFn"
    >
      <view class="tab2">
        <view :class="'a' + (globalUtils.empty(t) || t == 'new' ? ' ed' : '')" data-t="new" @tap="trend_tab2Fn">
          <view class="i _new ico"></view>
          <text class="span">最新</text>
        </view>
        <view :class="'a' + (t == 'hot' ? ' ed' : '')" data-t="hot" @tap="trend_tab2Fn">
          <view class="i _hot ico"></view>
          <text class="span">热门</text>
        </view>
        <view class="a" @tap="trend_addFn">
          <view class="i _add ico"></view>
          <text class="span">发布</text>
        </view>
        <view :class="'a' + (t == 'my' ? ' ed' : '')" data-t="my" @tap="trend_tab2Fn">
          <view class="i _my ico"></view>
          <text class="span">我的</text>
        </view>
        <view class="a" @tap="trend_soFn">
          <view class="i _so ico"></view>
          <text class="span">筛选</text>
        </view>
      </view>
      <block v-for="(dl2, trend_idx) in LIST" v-if="LIST.length > 0" :key="trend_idx">
        <view v-for="(item, trend_idx2) in dl2" :key="trend_idx2"
              :style="'--color:' + color + ';--rgbcolor:' + rgbcolor"
              class="dl">
          <view class="dt">
            <image :data-uid="item.uid" :src="item.photo_s" mode="aspectFill" @tap="bind_dl"></image>
          </view>

          <view class="dd">
            <view :class="'span ico ' + item.gzclass" :data-idx="trend_idx" :data-idx2="trend_idx2" :data-uid="item.uid"
                  @tap="gzFn">
              {{ item.gzclass == 'ed' ? '' : '' }} 喜欢
            </view>
            <view :data-uid="item.uid" class="h2" @tap="bind_dl">
              <text class="font">{{ item.nickname }}</text>
              <image :src="item.grade_ico" class="ugrade1"></image>
            </view>
            <view v-if="item.ifdel == 1" :data-id="item.id" class="delmy" @tap="delmyFn">删除</view>
            <view class="h3">{{ item.data_str }}</view>
            <view class="h1">{{ item.C.C }}</view>
            <view v-if="item.C.kind == 'pic'" class="h1">
              <image :src="item.C.path_b" class="alpha0_100_1s" mode="widthFix"></image>
            </view>
            <view v-if="item.pic_arr.length > 0" :class="item.pic_arr.length <= 1 ? 'h1' : 'p'">
              <image
                  v-for="(item3, index) in item.pic_arr"
                  :key="index"
                  :data-cur="item3"
                  :data-idx="trend_idx"
                  :data-idx2="trend_idx2"
                  :mode="item.pic_arr.length <= 1 ? 'widthFix' : 'aspectFill'"
                  :src="item3"
                  @tap="zoom9Fn"
              ></image>
            </view>
          </view>

          <view class="agree">
            <text class="time">{{ item.addtime }}</text>
            <view :class="'i ' + item.agree_class" :data-id="item.id" :data-idx="trend_idx" :data-idx2="trend_idx2"
                  @tap="agreeFn">
              <text class="font ico S16"></text>
              <text class="font">
                <text :style="'display:' + item.agreefly + ';'" class="b agreefly">+1</text>
                <text class="span">{{ item.agree_arr.length > 0 ? item.agree_arr.length : '' }}</text>
                　
              </text>
            </view>
            <view :class="'i ' + item.bbs_class" :data-id="item.id" :data-idx="trend_idx" :data-idx2="trend_idx2"
                  @tap="bbsFn">
              <text class="font ico S16"></text>
              <text class="font">
                <text class="span">{{ item.bbs_arr.length > 0 ? item.bbs_arr.length : '' }}</text>
              </text>
            </view>
          </view>

          <view class="j"></view>

          <view v-if="item.agree_arr.length > 0" class="em">
            <image v-for="(item2, index) in item.agree_arr" :key="index" :data-uid="item2.uid" :src="item2.photo_s"
                   mode="aspectFill" @tap="bind_dl"></image>
          </view>

          <view v-if="item.bbs_arr.length > 0" class="ul">
            <view v-for="(item3, index) in item.bbs_arr" :key="index" class="li">
              <image :data-uid="item3.uid" :src="item3.photo_s" class="m" mode="aspectFill" @tap="bind_dl"></image>

              <view class="h5">
                {{ item3.nickname }}：
                <text class="font">{{ item3.addtime }}</text>
              </view>

              <view class="span">
                <text :class="'font' + (item3.c == '审核中' ? ' C999' : '')">{{ item3.c }}</text>
              </view>
            </view>
          </view>
        </view>
      </block>
      <view v-if="trend_nodata" class="nodata">
        <image mode="aspectFit" src="/static/res/img/nodata.png"></image>
        暂时还没有人发动态　
        <text :style="'color:' + color" data-t="new" @tap="trend_tab2Fn">返回首页</text>
      </view>
      <view v-if="loading_flag" class="loading">
        <image v-if="loading_ico_flag" class="loading_ico" src="/static/res/img/loading_ico.svg"></image>
        <text>{{ loading_str }}</text>
      </view>
      <view class="blank">　</view>
    </scroll-view>
    <view v-if="trend_add" :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';'" class="trend_add fadeInUp"
          @tap="trend_addFn">
      <text class="i ico"></text>
      发布
    </view>
    <page-container
        :closeOnSlideDown="false"
        :overlay="true"
        :round="true"
        :show="bbsFormFlag"
        customStyle="height:35%"
        duration="300"
        position="top"
        zIndex="222"
        @clickoverlay="bbsFormMaskFn"
    >
      <form :data-id="bbs_form_id" :data-idx="bbs_form_idx" :data-idx2="bbs_form_idx2" @submit="bbs_submitFn">
        <view class="bbs_form_box">
          <view class="S16 B">发表评论</view>
          <textarea :focus="bbs_content_focus" :value="bbs_content" name="bbs_content"
                    placeholder="请文明发言~"></textarea>
        </view>
        <button :style="'width:80%;--color:' + color + ';--rgbcolor:' + rgbcolor" class="btn5" formType="submit"
                type="button">提交评论
        </button>
      </form>
    </page-container>

    <view v-if="backtop_flag_index" :style="'color:' + color" class="backtop fadeInUp" data-id="trend" @tap="backtopFn">
      <text class="ico icon-backtop"></text>
      顶部
    </view>
    <view v-if="div_right_flag" :class="'mask1 div_right_mask ' + div_right_mask_class"
          @tap.stop.prevent="div_right_close_Fn">
      <view :class="'div_right_box ' + div_right_box_class" @tap.stop.prevent="div_right_boxFn">
        <view class="div_left_so">
          <view class="tbody">动态筛选</view>
          <form class="form_uid" @submit="trend_form_uid_submitFn">
            <input
                :value="keyword"
                autocomplete="off"
                class="input"
                confirmType="search"
                maxlength="20"
                name="keyword"
                placeholder="按用户ID/昵称"
                type="text"
                @blur="SO_uid_bindblurFn"
                @confirm="trend_input_uid_submitFn"
            />
            <button class="ico" formType="submit" style="z-index: 9"></button>
            <input hidden name="sokind" type="text" value="keyword"/>
          </form>
          <form :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="form_ext"
                @submit="trend_form_ext_submitFn"
                @reset.stop.prevent="trend_form_ext_resetFn">
            <view v-for="(item, idx) in trendSO" :key="idx" class="tbox">
              <view class="h5 on">{{ item.tbody }}</view>

              <view class="ul def col3">
                <view
                    v-for="(item2, idx2) in item.arr"
                    :key="idx2"
                    :class="'li' + (globalUtils.indexOf(item.v, item2.i) ? ' ed' : '')"
                    :data-fkind="item.fkind"
                    :data-idx="idx"
                    :data-v="item2.i"
                    @tap="trend_form_ext_liFn"
                >
                  {{ item2.v }}
                </view>
              </view>

              <input :name="item.f" :value="item.v" hidden type="text"/>
            </view>
            <view class="savebox">
              <button class="reset" formType="reset">重置</button>
              <button class="ico" formType="submit"> 确定</button>
            </view>
            <view class="blank"></view>
          </form>
        </view>
      </view>
    </view>
    <!-- parse <include src="../login.wxml"></include> -->
    <block>
      <view v-if="div_login" class="mask3 alpha0_100">
        <view
            class="div_box big_normal"
            style="--div_box_width: 82%; --div_box_height: 666rpx; background: -webkit-linear-gradient(top, #fde9ee 1%, #fff 150%); background-color: #fff"
        >
          <view :style="'border-color:rgba(' + rgbcolor + ',.2);'" class="m">
            <image mode="aspectFit" src="/static/res/img/photo_m.png"></image>
          </view>
          <view class="S22 B">登录后获得更精准推荐</view>
          <view class="loginagree">
            <checkbox-group @change="ifagreeFn">
              <label style="margin-left: -10rpx">
                <checkbox :style="'--color:' + color + ';'" value="1"></checkbox>
                <text class="C666 vmiddle">阅读并同意</text>
              </label>
            </checkbox-group>
            <navigator :style="'color:' + color" class="vmiddle" hoverClass="none"
                       url="/pagesA/about/law?kind=agreement">用户协议
            </navigator>
            <text class="C666 vmiddle">与</text>
            <navigator :style="'color:' + color + ';'" class="vmiddle" hoverClass="none"
                       url="/pagesA/about/law?kind=declara">隐私条款
            </navigator>
          </view>
          <button
              v-if="ifagree"
              :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';width:73%'"
              class="btn5 W90_"
              openType="getPhoneNumber"
              @getphonenumber="getPhoneNumber"
          >
            <text>手机号快捷登录</text>
            <text :style="'color: ' + color + ';'">私密</text>
          </button>
          <button v-else :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';width:73%'"
                  class="btn5" @tap="ifagree_passFn">
            <text>手机号快捷登录</text>
            <text :style="'color: ' + color + ';'">私密</text>
          </button>
          <view class="C666" @tap="back">
            <text style="border-bottom: #999 1px solid">暂不登录</text>
          </view>
        </view>
      </view>
    </block>
    <!-- parse <include src="../component/sorry.wxml"></include> -->
    <sorry></sorry>
  </view>
</template>
<script>
import globalUtils from "../../res/www.a9a.cn";
import Sorry from "../../components/sorry/sorry.vue";

var t;
var a;
var e;
var n = require('../../@babel/runtime/helpers/defineProperty');
var i = require('../../res/www.a9a.cn.js');
var app = getApp();
var s = 2;
var o = true;
export default {
  components: {Sorry},
  computed: {
    globalUtils() {
      return globalUtils
    }
  },
  data() {
    return {
      nTitle: '嘉宾动态',
      t: 0,
      triggered: true,
      loading_flag: false,
      loading_ico_flag: false,
      loading_str: '玩命加载中',
      color: '',
      rgbcolor: '',
      LIST: [],
      trendSO: '',
      trend_nodata: false,
      SHARE: '',
      div_right_mask_class: '',
      div_right_box_class: '',
      div_right_flag: false,
      keyword: '',
      mask_class: '',
      div_login: false,
      bbsFormFlag: false,
      bbs_content: '',
      bbs_form_id: '',
      bbs_form_idx: '',
      bbs_form_idx2: '',
      bbs_content_focus: false,
      backtop_flag_index: false,
      trend_add: false,
      ifagree: false,
      nTop: '',
      nHeight: '',
      pages: [],
      scrolltopNum_trend: 0,
      nTH: '',
      trend_idx: 0,
      dl2: [],
      trend_idx2: 0,
      idx2: 0,
      div_vip: '',
      div_vip_H: 0,
      div_vip_title: '',
      div_vip_content: '',
      div_cert: '',
      div_cert_title: '',
      div_data: '',
      div_data_title: '',
      div_gps: [],
      div_gps_title: ''
    };
  },
  onLoad: function (t) {
    var that = this;
    uni.setNavigationBarTitle({
      title: that.nTitle
    });
    app.globalData.get_config('_ZEAI').then(function (t) {
      that.setData({
        color: app.globalData._ZEAI.color,
        rgbcolor: i.c16_rgb(app.globalData._ZEAI.color)
      });
    });
    app.globalData.get_navigationBarTopHeight(that);
    this.init();
  },
  onShareAppMessage: function (t) {
    return {
      imageUrl: this.SHARE.imgurl,
      title: this.SHARE.title,
      path: '/pages/trend/trend'
    };
  },
  onShareTimeline: function () {
    return {
      imageUrl: this.SHARE.imgurl,
      title: this.SHARE.title,
      query: '',
      path: '/pages/trend/trend'
    };
  },
  methods: {
    init: function () {
      var that = this;
      uni.showLoading({
        title: '玩命加载中...',
        mask: true
      });
      o = false;
      var s = {
        submitok: 'trend',
        openid: (a = uni.getStorageSync('COOK_U')).openid
      };
      i.empty(e) || (s = JSON.parse((JSON.stringify(s) + JSON.stringify(e)).replace(/}{/, ',')));
      app.globalData.ajax({
        url: 'trend.php',
        data: s,
        success: function (a) {
          var e;
          if (1 == a.flag) {
            if (0 == a.LIST.length) {
              that.setData({
                LIST: [],
                trendSO: a.SO,
                trend_nodata: true,
                SHARE: a.SHARE
              });
            } else {
              that.setData((n((e = {}), 'LIST[0]', a.LIST), n(e, 'trendSO', a.SO), n(e, 'SHARE', a.SHARE), e));
            }
          } else {
            a.this = that;
            a.url = 'no';
            i.sorry(a);
          }
          o = true;
          uni.hideLoading();
        }
      });
    },

    trend_tab2Fn: function (t) {
      var a = t.currentTarget.dataset.t;
      e = {
        t: a
      };
      this.setData({
        t: a
      });
      this.init();
    },

    trend_addFn: function () {
      console.log('我点击了这个按钮')
      app.globalData.chklogin().then(function (t) {
        t
            ? uni.navigateTo({
              url: '/pagesA/trend/trend_add'
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    delmyFn: function (t) {
      var that = this;
      app.globalData.chklogin().then(function (n) {
        if (n) {
          var s = t.currentTarget.dataset.id;
          uni.showModal({
            title: '',
            content: '确定要删除么？',
            confirmColor: that.color,
            cancelText: '取消',
            confirmText: '确定',
            success: function (t) {
              if (t.confirm) {
                app.globalData.ajax({
                  url: 'trend.php',
                  data: {
                    submitok: 'trend_del',
                    id: s,
                    openid: a.openid
                  },
                  success: function (t) {
                    1 == t.flag ? that.init() : ((t.this = that), (t.url = 'no'), i.sorry(t));
                  }
                });
              }
            }
          });
        } else {
          uni.navigateTo({
            url: '/pages/login/login'
          });
        }
      });
    },

    zoom9Fn: function (t) {
      var a = t.currentTarget.dataset.cur;
      var e = t.currentTarget.dataset.idx;
      var n = t.currentTarget.dataset.idx2;
      i.empty(a) ||
      uni.previewImage({
        current: a,
        urls: this.LIST[e][n].pic_arr
      });
    },

    trend_soFn: function () {
      this.setData({
        div_right_mask_class: 'alpha0_100',
        div_right_box_class: 'div_leftAnm1',
        div_right_flag: true
      });
    },

    SO_uid_bindblurFn: function (t) {
      var a = t.detail.value;
      this.setData({
        keyword: a
      });
    },

    div_right_close_Fn: function () {
      var that = this;
      this.setData({
        div_right_mask_class: 'alpha100_0',
        div_right_box_class: 'div_leftAnm2'
      });
      setTimeout(function () {
        that.setData({
          div_right_flag: false
        });
      }, 500);
    },

    div_right_boxFn: function () {
    },

    trend_form_uid_submitFn: function (t) {
      var a = t.detail.value.keyword;
      e = {
        keyword: a
      };
      this.div_right_close_Fn();
      this.init();
    },

    trend_input_uid_submitFn: function (t) {
      var a = t.detail.value;
      e = {
        keyword: a
      };
      this.div_right_close_Fn();
      this.init();
    },

    trend_form_ext_liFn: function (t) {
      var a;
      var e = t.currentTarget.dataset.idx;
      var r = t.currentTarget.dataset.v;
      var s = t.currentTarget.dataset.fkind;
      var o = this.trendSO[e].v;
      a = i.empty(o) ? r : 'checkbox' == s ? (i.indexOf(o, r) ? (a = i.json_remove(o, r)).join(',') : o + ',' + r) : r;
      if (0 == r) {
        a = 0;
      }
      this.setData(n({}, 'trendSO[' + e + '].v', a));
    },

    trend_form_ext_submitFn: function (t) {
      (e = t.detail.value).keyword = this.keyword;
      this.div_right_close_Fn();
      this.init();
    },

    trend_form_ext_resetFn: function (t) {
      var a = this.trendSO;
      for (var e in a) {
        this.setData(n({}, 'trendSO[' + e + '].v', 0));
      }
      this.setData({
        keyword: ''
      });
    },

    setloading: function (t, a) {
      'start' == t
          ? this.setData({
            loading_flag: true,
            loading_ico_flag: true,
            loading_str: a
          })
          : this.setData({
            loading_flag: false,
            loading_ico_flag: false,
            loading_str: a
          });
    },

    gzFn: function (t) {
      var that = this;
      var s = t.currentTarget.dataset.idx;
      var o = t.currentTarget.dataset.idx2;
      var d = t.currentTarget.dataset.uid;
      app.globalData.chklogin().then(function (t) {
        t
            ? ((a = uni.getStorageSync('COOK_U')),
                app.globalData.ajax({
                  url: 'u.php',
                  data: {
                    submitok: 'ajax_gz',
                    uid: d,
                    openid: a.openid
                  },
                  success: function (t) {
                    1 == t.flag
                        ? (that.setData(n({}, 'LIST[' + s + '][' + o + '].gzclass', t.gzclass)),
                            uni.showToast({
                              title: t.msg,
                              icon: 'none',
                              mask: true
                            }))
                        : ((t.this = that), (t.url = 'no'), i.sorry(t));
                  }
                }))
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    bind_dl: function (t) {
      var a = t.currentTarget.dataset.uid;
      uni.navigateTo({
        url: '/pagesA/u/u?uid=' + a
      });
    },

    dataFn: function () {
      uni.navigateTo({
        url: '/pagesA/reg/reg'
      });
    },


    back: function () {
      this.setData({
        div_login: false
      });
    },

    agreeFn: function (t) {
      var that = this;
      var s = t.currentTarget.dataset.idx;
      var o = t.currentTarget.dataset.idx2;
      var d = t.currentTarget.dataset.id;
      app.globalData.chklogin().then(function (t) {
        t
            ? ((a = uni.getStorageSync('COOK_U')),
                app.globalData.ajax({
                  url: 'trend.php',
                  data: {
                    submitok: 'ajax_agree',
                    tid: d,
                    openid: a.openid
                  },
                  success: function (t) {
                    if (1 == t.flag) {
                      var a;
                      var r = that.LIST[s][o].agree_arr.length;
                      that.setData(
                          (n((a = {}), 'LIST[' + s + '][' + o + '].agreefly', 'block'),
                              n(a, 'LIST[' + s + '][' + o + '].agree_arr[' + r + ']', {
                                uid: t.uid,
                                photo_s: t.photo_s
                              }),
                              a)
                      );
                    } else {
                      t.this = that;
                      t.url = 'no';
                      i.sorry(t);
                    }
                  }
                }))
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    bbsFn: function (t) {
      var that = this;
      var e = this;
      app.globalData.chklogin().then(function (n) {
        console.log('是否登录返回的是什么值', n)
        if (n) {
          var i = t.currentTarget.dataset.idx;
          var r = t.currentTarget.dataset.idx2;
          var s = t.currentTarget.dataset.id;
          console.log('方法的传参', i, r, s)

          that.setData({
            bbsFormFlag: true,
            bbs_content: '',
            bbs_form_id: s,
            bbs_form_idx: i,
            bbs_form_idx2: r
          });
          setTimeout(function () {
            e.setData({
              bbs_content_focus: true
            });
          }, 500);
        } else {
          uni.navigateTo({
            url: 'pages/login/login'
          });
        }
      });
    },

    bbsFormMaskFn: function () {
      this.setData({
        bbsFormFlag: false,
        bbs_content_focus: false
      });
    },

    bbs_submitFn: function (t) {
      var that = this;
      app.globalData.chklogin().then(function (s) {
        s
            ? uni.showModal({
              title: '温馨提醒',
              content: '确定提交么？\n以下情形话题将被删除或封号：\n1．请勿留下任何形式联系方法\n2．请勿发表涉黄涉政相关言论\n3．请勿发表辱骂攻击他人言论',
              confirmColor: that.color,
              cancelText: '取消',
              confirmText: '确定',
              success: function (s) {
                if (s.confirm) {
                  var o = t.currentTarget.dataset.idx;
                  var d = t.currentTarget.dataset.idx2;
                  var c = t.currentTarget.dataset.id;
                  var l = t.detail.value.bbs_content;
                  a = uni.getStorageSync('COOK_U');
                  app.globalData.ajax({
                    url: 'trend.php',
                    data: {
                      submitok: 'bbs_add',
                      fid: c,
                      content: l,
                      openid: a.openid
                    },
                    success: function (t) {
                      if (1 == t.flag) {
                        var a;
                        var r = that.LIST[o][d].bbs_arr.length;
                        that.setData(
                            (n((a = {}), 'LIST[' + o + '][' + d + '].bbs_class', t.ARR.bbs_class),
                                n(a, 'LIST[' + o + '][' + d + '].bbs_arr[' + r + ']', t.ARR.bbs_arr),
                                n(a, 'bbsFormFlag', false),
                                n(a, 'bbs_content_focus', false),
                                a)
                        );
                      } else {
                        t.this = that;
                        t.url = 'no';
                        i.sorry(t);
                      }
                    }
                  });
                }
              }
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    getPhoneNumber: function (t) {
      app.globalData.getPhoneNumber({
        e: t,
        url: '/pagesA/reg/reg',
        urlkind: 'navigateTo'
      });
    },

    trend_topFn: function (t) {
      var that = this;
      uni.vibrateShort({
        type: 'heavy'
      });
      setTimeout(function () {
        that.setData({
          triggered: false,
          LIST: []
        });
        that.setloading('end', '拼命加载中');
        s = 2;
        that.init();
      }, 500);
    },

    trend_btmFn: function (t) {
      var d = this.LIST;
      var that = this;
      if (o) {
        o = false;
        that.setloading('start', '拼命加载中');
        var l = {
          submitok: 'trend',
          p: s,
          openid: a.openid
        };
        i.empty(e) || (l = JSON.parse((JSON.stringify(l) + JSON.stringify(e)).replace(/}{/, ',')));
        app.globalData.ajax({
          url: 'trend.php',
          data: l,
          success: function (t) {
            if (1 == t.flag) {
              var a = d.length;
              if (t.LIST.length < 1) {
                that.setloading('end', '已全部加载完毕');
                return void (o = false);
              }
              that.setData(n({}, 'LIST[' + a + ']', t.LIST));
              s++;
            } else {
              uni.showToast({
                title: t.msg,
                icon: 'none',
                mask: true
              });
            }
            that.setloading('end', '上拉加载更多');
            o = true;
          }
        });
      }
    },

    binnd_scroll_index: function (t) {
      t.detail.scrollTop > 100
          ? this.setData({
            backtop_flag_index: true,
            trend_add: true
          })
          : this.setData({
            backtop_flag_index: false,
            trend_add: false
          });
    },

    backtopFn: function (t) {
      var a = 'scrolltopNum_' + t.currentTarget.dataset.id;
      this.setData(n({}, a, 0));
    },

    ifagreeFn: function (t) {
      1 == t.detail.value
          ? this.setData({
            ifagree: true
          })
          : this.setData({
            ifagree: false
          });
    },
    ifagree_passFn: function () {
      uni.showToast({
        title: '请先点击同意《用户协议》和《隐私条款》',
        icon: 'none',
        mask: true,
        duration: 3000
      });
    },
  }
};
</script>
<style>
@import 'trend.css';
</style>
